namespace SmartPeople.Framework.SecuritySpace
{
    public interface ISecuritySecuredTypeProvider
    {
        /// <summary>
        /// Creates the type.
        /// </summary>
        /// <param name="typeName">Name of the type.</param>
        /// <returns></returns>
        ISecuritySecuredType CreateType(string typeName);

        /// <summary>
        /// Creates the type.
        /// </summary>
        /// <param name="typeName">Name of the type.</param>
        /// <param name="baseTypeName">Name of the base type.</param>
        /// <returns>ISecuritySecuredType</returns>
        ISecuritySecuredType CreateType(string typeName, string baseTypeName);

        /// <summary>
        /// Creates the type.
        /// </summary>
        /// <param name="typeName">Name of the type.</param>
        /// <param name="baseSecuredType">Type of the base secured.</param>
        /// <returns>ISecuritySecuredType</returns>
        ISecuritySecuredType CreateType(string typeName, ISecuritySecuredType baseSecuredType);

        /// <summary>
        /// Gets the secured type
        /// </summary>
        /// <param name="securedTypeName">Name of the secured type.</param>
        /// <returns>ISecuritySecuredType</returns>
        ISecuritySecuredType GetSecuredType(string securedTypeName);

        /// <summary>
        /// Gets all secured types.
        /// </summary>
        /// <returns>ISecuritySecuredType[]</returns>
        ISecuritySecuredType[] GetAllSecuredTypes();

        /// <summary>
        /// Updates the type of the secured.
        /// </summary>
        /// <param name="securedType">Type of the secured.</param>
        void UpdateSecuredType(ISecuritySecuredType securedType);

        /// <summary>
        /// Secureds the type exists.
        /// </summary>
        /// <param name="securedTypeName">Name of the secured type.</param>
        /// <returns>SecuredTypeExists</returns>
        bool SecuredTypeExists(string securedTypeName);

        /// <summary>
        /// Deletes the type of the secured.
        /// </summary>
        /// <param name="securedTypeName">Name of the secured type.</param>
        /// <param name="deleteAllRelatedData">if set to <c>true</c> [delete all related data].</param>
        /// <returns>DeleteSecuredType</returns>
        bool DeleteSecuredType(string securedTypeName, bool deleteAllRelatedData);

        /// <summary>
        /// Clears this instance.
        /// </summary>
        void Clear();

        int Count { get; }
    }
}